#pragma once

#include "math.h"
#include "IDomain2.h"


class Disk2 : public IImplicitBounded2
{
public:
	Disk2() : radius_() {}
	Disk2(Scalar radius)
		: radius_(radius)
	{
	}

	Scalar radius() const {	return radius_; }

	virtual const Vector2 internalPoint() const {	return Vector2(0, 0); }

	virtual const Vector2 supportPoint(const Vector2& normal) const;

	virtual IEdgeIterator2* boundary(IStackAllocator& stack) const;

	virtual IEdge2* trim(
		const Vector2&		startNormal,
		const Vector2&		endNormal,
		IStackAllocator&	stack
	) const;

private:
	Scalar radius_;
};
